<?php
/**
 * 导航类，头部导航管理类  
 * @author jianhui
 *
 */
class Navbar{
    var $user = null;
    var $menuList = array();
    /**
     * 构造函数
     * @param array $user
     */
    function Navbar($user){
        $this->user = $user;
    }
    /**
     * 获取菜单列表
     */
    function getNavbarList(){
        if ($this->user['userRole'] == 1){
            //费用总控表
            $this->menuList[] = array('Main', 'storeTotal', 'title'=>'费用使用总控表');
            //专营店营销基金
            $this->menuList[] = array('CommonBudget','storeList','title'=>'专营店营销基金申报','child'=>array(
                array('CommonBudget','storeList','title'=>'专营店营销基金预算申报','childFocus'=>array(
                    'CommonBudget_storeList','CommonBudget_storeAdd','CommonBudget_storeEdit','CommonBudget_check'
                )),
                array('CommonSettle','storeList','title'=>'专营店营销基金结算申报','childFocus'=>array(
                    'CommonSettle_storeList','CommonSettle_check','CommonSettle_storeEdit'
                )),
            ));
            //区域营销基金
            $this->menuList[] = array('AreaBudget','storeList','title'=>'区域营销基金申报','child'=>array(
                array('AreaBudget','storeList','title'=>'区域营销基金预算申报','childFocus'=>array(
                    'AreaBudget_storeList','AreaBudget_storeAdd','AreaBudget_storeEdit','AreaBudget_check'
                )),
                array('AreaSettle','storeList','title'=>'区域营销基金结算申报','childFocus'=>array(
                    'AreaSettle_storeList','AreaSettle_check','AreaSettle_storeEdit'
                )),
            ));
            //品牌活动
            $this->menuList[] = array('CarBudget','storeList','title'=>'品牌活动基金申报','child'=>array(
                array('CarBudget','storeList','title'=>'车展基金预算申报','childFocus'=>array(
                    'CarBudget_storeList','CarBudget_storeAdd','CarBudget_storeEdit','CarBudget_check'
                )),
                array('CarSettle','storeList','title'=>'车展基金结算申报','childFocus'=>array(
                    'CarSettle_storeList','CarSettle_check','CarSettle_storeEdit'
                )),
                'line',
                array('XunBudget','storeList','title'=>'巡展基金预算申报','childFocus'=>array(
                    'XunBudget_storeList','XunBudget_storeAdd','XunBudget_storeEdit','XunBudget_check'
                )),
                array('XunSettle','storeList','title'=>'巡展基金结算申报','childFocus'=>array(
                    'XunSettle_storeList','XunSettle_check','XunSettle_storeEdit'
                )),
            ));
            //专项基金
            $this->menuList[] = array('SpecialBudget','storeList','title'=>'专项基金申报','child'=>array(
                array('SpecialBudget','storeList','title'=>'专项基金预算申报','childFocus'=>array(
                    'SpecialBudget_storeList','SpecialBudget_storeAdd','SpecialBudget_storeEdit','SpecialBudget_check'
                )),
                array('SpecialSettle','storeList','title'=>'专项基金结算申报','childFocus'=>array(
                    'SpecialSettle_storeList','SpecialSettle_check','SpecialSettle_storeEdit'
                )),
            ));
            //小助手
            $this->menuList[] = array('Help', 'fileCheck', 'title'=>'小助手'); 
        }else{
            //费用总控表
            $this->menuList[] = array('Main', 'adminTotal', 'title'=>'费用使用总控表');
            //专营店营销基金
            $this->menuList[] = array('CommonBudget','adminList','title'=>'专营店营销基金申报管理','child'=>array(
                array('CommonBudget','adminList','title'=>'专营店营销基金预算申报管理','childFocus'=>array(
                    'CommonBudget_adminList','CommonBudget_adminAudit','CommonBudget_check'
                )),
                array('CommonSettle','adminList','title'=>'专营店营销基金结算申报管理','childFocus'=>array(
                    'CommonSettle_adminList','CommonSettle_adminAudit','CommonSettle_check'
                )),
            ));
            //区域营销基金
            $this->menuList[] = array('AreaBudget','adminList','title'=>'区域营销基金申报管理','child'=>array(
                array('AreaBudget','adminList','title'=>'区域营销基金预算申报管理','childFocus'=>array(
                    'AreaBudget_adminList','AreaBudget_adminAudit','AreaBudget_check'
                )),
                array('AreaSettle','adminList','title'=>'区域营销基金结算申报管理','childFocus'=>array(
                    'AreaSettle_adminList','AreaSettle_adminAudit','AreaSettle_check'
                )),
            ));
            //品牌活动
            $this->menuList[] = array('CarBudget','adminList','title'=>'品牌活动基金申报管理','child'=>array(
                array('CarBudget','adminList','title'=>'车展基金预算申报管理','childFocus'=>array(
                    'CarBudget_adminList','CarBudget_adminAudit','CarBudget_check'
                )),
                array('CarSettle','adminList','title'=>'车展基金结算申报管理','childFocus'=>array(
                    'CarSettle_adminList','CarSettle_adminAudit','CarSettle_check'
                )),
                'line',
                array('XunBudget','adminList','title'=>'巡展基金预算申报管理','childFocus'=>array(
                    'XunBudget_adminList','XunBudget_adminAudit','XunBudget_check'
                )),
                array('XunSettle','adminList','title'=>'巡展基金结算申报管理','childFocus'=>array(
                    'XunSettle_adminList','XunSettle_adminAudit','XunSettle_check'
                )),
            ));
            //专项基金
            $this->menuList[] = array('SpecialBudget','adminList','title'=>'专项基金申报管理','child'=>array(
                array('SpecialBudget','adminList','title'=>'专项基金预算申报管理','childFocus'=>array(
                    'SpecialBudget_adminList','SpecialBudget_adminAudit','SpecialBudget_check'
                )),
                array('SpecialSettle','adminList','title'=>'专项基金结算申报管理','childFocus'=>array(
                    'SpecialSettle_adminList','SpecialSettle_adminAudit','SpecialSettle_check'
                )),
            ));
            //报表管理菜单
            $this->menuList[] = array('Report', 'index', 'title'=>'报表管理');
            if ($this->user['userRole'] == 6){
                $this->menuList[] = array('Import', 'index', 'title'=>'数据导入管理');
                $this->menuList[] = array('Help', 'fileList', 'title'=>'小助手管理');
                //$this->menuList[] = array('Help', 'noticeList', 'title'=>'公告栏管理');
            }else{
                $this->menuList[] = array('Help', 'fileCheck', 'title'=>'小助手');
            }
        }
        return $this->menuList;
    }
}